//
//  WATFModel.swift
//  WiFiFaster
//
//  Created by one on 2023/12/28.
//

import UIKit
import ObjectMapper
enum WATFFuncType: NSInteger, Codable {
    case watf_speed = 0
    case watf_speedUP
    case watf_interference
    case watf_idle
    case watf_optimization
    case watf_ftvConnect
    case watf_ftvDisConnect
    var watf_title:String {
        switch self {
        case .watf_speed:
            return "Test Speed"
        case .watf_speedUP:
            return "Speed Up"
        case .watf_interference:
            return "Clear interference"
        case .watf_idle:
            return "Clear idle processes"
        case .watf_optimization:
            return "Optimization speed"
        default:
            return ""
        }
    }
}
enum WATFSettingType: NSInteger {
    case watf_privacy = 0
    case watf_rate
    case watf_share
}
//MARK: - watf setting
struct WATFSettingModel {
    var watf_title: String = ""
    var watf_type: WATFSettingType = .watf_privacy
}
//MARK: - watf funcModel
class WATFFuncModel: NSObject {
    var watf_type: WATFFuncType = .watf_speed
    var watf_title: String = ""
    var watf_complete: Bool = false
    init(watf_type: WATFFuncType = .watf_speed, watf_title: String = "", watf_complete: Bool = false) {
        self.watf_type = watf_type
        self.watf_title = watf_title
        self.watf_complete = watf_complete
    }
}
//MARK: - watf WATFSpeedModel
class WATFSpeedModel: NSObject {
    var watf_download: String = ""
    var watf_upload: String = ""
    var watf_name: String = ""
    var watf_loss: String = ""
    var watf_jitter: String = ""
    
}
//MARK: - watf ftv
enum WATFFTVStateClickType: NSInteger {
    case watf_none = 0
    case watf_connect
    case watf_disConnect
    case watf_disAndConnect
}
@objc enum WATFFTVStateType: NSInteger {
    /** @const NEVPNStatusInvalid The VPN is not configured. */
    case watf_invalid = 0

    /** @const NEVPNStatusDisconnected The VPN is disconnected. */
    case watf_disconnected = 1

    /** @const NEVPNStatusConnecting The VPN is connecting. */
    case watf_connecting = 2

    /** @const NEVPNStatusConnected The VPN is connected. */
    case watf_connected = 3

    /** @const NEVPNStatusReasserting The VPN is reconnecting following loss of underlying network connectivity. */
    case watf_reasserting = 4

    /** @const NEVPNStatusDisconnecting The VPN is disconnecting. */
    case watf_disconnecting = 5
    case watf_none = 6
    var watf_title:String {
        switch self {
        case .watf_invalid:
            return "watf_invalid"
        case .watf_disconnected:
            return "watf_disconnected"
        case .watf_connecting:
            return "watf_connecting"
        case .watf_connected:
            return "watf_connected"
        case .watf_reasserting:
            return "watf_reasserting"
        case .watf_disconnecting:
            return "watf_disconnecting"
        default:
            return "watf_none"
        }
    }
}
class WATFFTVRequestModel : NSObject, Mappable, Codable {
    var watf_YfaBE: NSInteger = 0
    var watf_usTjc:WATFFTVRemoteModel = WATFFTVRemoteModel()
    override init() {
        
    }
    required init?(map: Map) {}
    func mapping(map: Map) {
        watf_usTjc    <- map["usTjc"]
        watf_YfaBE    <- map["watf_YfaBE"]
    }
}

class WATFFTVRemoteModel : NSObject, Mappable, Codable {
    var watf_vtYcB: String = "" //用户名
    var watf_uNeAY: String = "" //密码
    var watf_pnEsK: Int = 0 //开始端口
    var watf_dhKWY: Int = 0 //结束端口
    var watf_tsgme:[WATFFTVRemoteServerModel] = [WATFFTVRemoteServerModel]()
    override init() {
        
    }
    required init?(map: Map) {}
    func mapping(map: Map) {
        watf_vtYcB  <- map["VtYcB"]
        watf_uNeAY    <- map["UNeAY"]
        watf_pnEsK    <- map["pnEsK"]
        watf_dhKWY    <- map["DhKWY"]
        watf_tsgme  <- map["tsgme"]
    }
}

class WATFFTVRemoteServerModel : NSObject, Mappable, Codable {
    var watf_hsQFu: String = "" //地址
    var watf_bCqRk: String = "" //国家
    var watf_pingValue: NSInteger = 0
    var watf_select: Bool = false
    override init() {
        
    }
    required init?(map: Map) {}
    func mapping(map: Map) {
        watf_hsQFu    <- map["hsQFu"]
        watf_bCqRk    <- map["bCqRk"]
        watf_pingValue    <- map["watf_pingValue"]
        watf_select    <- map["watf_select"]
    }
}
class WATFFTVTempModel: NSObject {
    var watf_address: String = ""
    var watf_city: String = ""
    var watf_country: String = ""
    var watf_date: Date = Date()
    var watf_icon:String = ""
    var watf_index: Int64 = 0
    var watf_method: String = ""
    var watf_password: String = ""
    var watf_port: Int64 = 0
    var watf_default: Bool = false
    var watf_select: Bool = false
    var watf_smart: Bool = false
    var watf_ftvList: Bool = false
    var watf_pingValue: NSInteger = 0
    
}
